import paymentTaskApi from '@/config/server/api/order.js'
import dt from '@dt/dt'
import Helper from '@/common/helper'

function listInfo(params) {
  return paymentTaskApi.paymentManagement.selectHandoverList.fetch(params)
}

function exportTaskList(params) {
  return paymentTaskApi.paymentManagement.exportPayBackTaskList.fetch(params)
}

function selectRepaymentPlanDetailsWeb(params) {
  return paymentTaskApi.paymentManagement.selectRepaymentPlanDetailsWeb.fetch(params).then((res) => {
    res.planTime = res.planTime ? Helper.formatDateTime(res.planTime) : ''
    return res
  })
}

function enterPaymentWeb(params) {
  return paymentTaskApi.paymentManagement.enterPaymentWeb.fetch(params)
}
export default {
  listInfo,
  exportTaskList,
  selectRepaymentPlanDetailsWeb,
  enterPaymentWeb
}